import request from "@/utils/request";
import { LoginVo, LoginInfo } from "@/types/login";

/**
 * 获取网站配置
 * @returns
 */
export const login = (data: LoginVo): ResponseResult<LoginInfo> =>
  request({
    url: `${process.env.VUE_APP_BASE_API}/login`,
    method: "POST",
    data,
  });
export const logout = (): ResponseDefault =>
  request({
    url: `${process.env.VUE_APP_BASE_API}/logout`,
    method: "POST",
    headers: {
      login: true,
    },
  });
